<h1><%= title "Potential Spouses for #{@character.name_and_title}" %></h1>

<% if @potentials && @potentials.size > 0 %>
	<table>
		<tr>
			<th>Character</th>
			<th>Liege</th>
			<th>Age</th>
			<th>Prestige</th>
			<th>Wealth</th>
			<th>Piety</th>
			<th>Traits</th>
			<th></th>
		</tr>
		<% for character in @potentials %>
		<tr>
			<td><%=link_to_record character%></td>
			<td><%=link_to_record character.liege%></td>
			<td><%=character.age%></td>
			<td><%=character.prestige%></td>
			<td><%=character.wealth%></td>
			<td><%=character.piety%></td>
			<td><%=character_traits character %></td>
			<td>
				<% form_for @marriage do |f| %>
					<%= f.hidden_field :character_id %>
					<%= f.hidden_field :from %>
					Dowry: <%= f.text_field :dowry, :size => 4 %> gold 
					<input type="hidden" name="marriage[to]" value="<%=character.id%>"/>
					<%= f.submit 'Propose' %>
	  			<% end %>
			</td>
		</tr>
		<% end %>
	</table>
<% else %>
<p>None</p>
<% end %>
<br />